home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch ;
- access ;
- symbols sprited:1.2.1;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 88.07.29.17.40.34; author ouster; state Exp;
- branches 1.2.1.1;
- next 1.1;
-
- 1.1
- date 88.07.29.17.20.06; author ouster; state Exp;
- branches ;
- next ;
-
- 1.2.1.1
- date 91.12.10.15.50.34; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @Lint.
- @
- text
- @/*
- * getppid.c --
- *
- * Source code for the getppid library procedure.
- *
- * Copyright 1988 Regents of the University of California
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: getppid.c,v 1.1 88/07/29 17:20:06 ouster Exp $ SPRITE (Berkeley)";
- #endif not lint
-
- #include <sprite.h>
- #include <proc.h>
- #include "compatInt.h"
-
- /*
- *----------------------------------------------------------------------
- *
- * getppid --
- *
- * Procedure to map from Unix getppid system call to Sprite Proc_GetIDs.
- *
- * Results:
- * UNIX_ERROR is returned upon error, with the actual error code
- * stored in errno. Upon success, the ID of the parent of the current
- * process is returned.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
- int
- getppid()
- {
- ReturnStatus status; /* result returned by Proc_GetIDs */
- int parentPid; /* ID of parent of current process */
-
- status = Proc_GetIDs((int *) NULL, &parentPid, (int *) NULL, (int *) NULL);
- if (status != SUCCESS) {
- errno = Compat_MapCode(status);
- return(UNIX_ERROR);
- } else {
- return(parentPid);
- }
- }
- @
-
-
- 1.2.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d17 1
- a17 1
- static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/getppid.c,v 1.2 88/07/29 17:40:34 ouster Exp $ SPRITE (Berkeley)";
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d17 1
- a17 1
- static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
- @
-